﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PropertyManagement.Core.Model {
    public class HistoryInstrumentBill {
        public string HouseCode { get; set; }
        public string ApartmentName { get; set; }
        public string OwnerName { get; set; }

        public BillType BillType { get; set; }

        public string BillTypeName {
            get { return BillTypeHelper.GetBillTypeName(BillType); }
        }

        public decimal CallableMoney { get; set; }
        public DateTime BillEffectiveDate { get; set; }
        public DateTime ExpireDate { get; set; }

        public string InstrumentName { get { return HouseCode + "_" + InstrumentTypeHelper.GetInstrumentTypeName(InstrumentType); }}
        public InstrumentType InstrumentType { get; set; }
        public int LastValue { get; set; }
        public int CurrentValue { get; set; }
        public int CurrentNumber { get { return CurrentValue - LastValue; }}
        public DateTime? LastDate { get; set; }
        public DateTime? CurrentDate { get; set; }

        public decimal OverdueFee { get; set; }
        public DateTime PaidDate { get; set; }
        public string PaidDateShow {
            get { return PaidDate != DateTime.MaxValue ? PaidDate.ToString("yyyy-MM-dd") : "--"; }
        }
        public decimal PaidMoney { get; set; }
        public bool IsCompletedPaid { get; set; }
        public string PaidStatus {
            get { return IsCompletedPaid ? "已缴纳" : "未缴纳"; }
        }

        public DateTime LastUpdate { get; set; }
        public string LastActionUserName { get; set; }
    }


    public class HistoryManagementBill {
        public string HouseCode { get; set; }
        public string ApartmentName { get; set; }
        public string OwnerName { get; set; }
        public int SpaceArea { get; set; }
        public BillType BillType { get; set; }
        public string BillTypeName {
            get { return BillTypeHelper.GetBillTypeName(BillType); }
        }
        public decimal CallableMoney { get; set; }
        public DateTime BillEffectiveDate { get; set; }
        public DateTime ExpireDate { get; set; }

        public decimal OverdueFee { get; set; }
        public DateTime PaidDate { get; set; }
        public decimal PaidMoney { get; set; }
        public bool IsCompletedPaid { get; set; }
        public string PaidStatus {
            get { return IsCompletedPaid ? "已缴纳" : "未缴纳"; }
        }

        public DateTime LastUpdate { get; set; }
        public string LastActionUserName { get; set; }
    }

    public class HistoryBill {
        public int BillID { get; set; }
        public string HouseCode { get; set; }
        public string ApartmentName { get; set; }
        public string OwnerName { get; set; }

        public int FeeNumber { get; set; }
        public decimal UnitPrice { get; set; }

        public BillType BillType { get; set; }
        public string BillTypeName {
            get { return BillTypeHelper.GetBillTypeName(BillType); }
        }
        public decimal CallableMoney { get; set; }
        public DateTime BillEffectiveDate { get; set; }
        public DateTime ExpireDate { get; set; }
        public decimal OverdueFee { get; set; }
        public DateTime PaidDate { get; set; }
        public string PaidDateShow {
            get { return PaidDate != DateTime.MaxValue ? PaidDate.ToString("yyyy-MM-dd") : "--"; }
        }
        public decimal PaidMoney { get; set; }
        public bool IsCompletedPaid { get; set; }
       

        public string PaidStatus {
            get { return IsCompletedPaid ? "已缴纳" : "未缴纳"; }
        }

        public DateTime LastUpdate { get; set; }
        public string LastActionUserName { get; set; }
    }
}
